package com.geekbing.elklog.util.response;

public enum ResultCode {
    // 成功
    SUCCESS(200, "ok"),

    // 失败
    FAIL(400, "fail"),

    // 未认证（签名错误）
    UNAUTHORIZED(401, "未认证（签名错误）"),

    // 未约定的值
    UNKOWNPARAM(402, "未约定的值"),

    // 接口不存在
    NOT_FOUND(404, "接口不存在"),

    // 参数错误
    PARAM_ERROR(405, "参数错误"),

    // 服务器内部错误
    INTERNAL_SERVER_ERROR(500, "服务器内部错误");

    private int code;
    private String message;

    ResultCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
